<template>
  <div @click="fatherFn">
    <!-- 按键修饰符：给键盘事件增加功能 -->
    <!-- 按下指定按键才会触发事件 -->
    <input type="text" @click.stop="" @keydown.enter="enterFn">
    <input type="text" @keydown.esc="escFn">
  </div>
</template>

<script>
export default {
  name: 'CodeApp',

  data() {
    return {
      
    };
  },

  mounted() {
    
  },

  methods: {
    fatherFn(){
     console.log('爹被点击了');
    },
    enterFn(){
      console.log('回车被按下');
    },
    escFn(){
      console.log('取消被按下');
    }
  },
};
</script>

<style lang="scss" scoped>

</style>